import request from '@/utils/request'

// 查询服务协议列表
export function listAgreement(query) {
  return request({
    url: '/system/agreement/list',
    method: 'get',
    params: query
  })
}

// 查询服务协议详细
export function getAgreement(serviceAgreementId) {
  return request({
    url: '/system/agreement/' + serviceAgreementId,
    method: 'get'
  })
}

// 新增服务协议
export function addAgreement(data) {
  return request({
    url: '/system/agreement',
    method: 'post',
    data: data
  })
}

// 修改服务协议
export function updateAgreement(data) {
  return request({
    url: '/system/agreement',
    method: 'put',
    data: data
  })
}

// 删除服务协议
export function delAgreement(serviceAgreementId) {
  return request({
    url: '/system/agreement/' + serviceAgreementId,
    method: 'delete'
  })
}

// 导出服务协议
export function exportAgreement(query) {
  return request({
    url: '/system/agreement/export',
    method: 'get',
    params: query
  })
}